package cqrtplm;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import cqrtplm.config.ConfigurableAttrCardsConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication(scanBasePackages = {"cqrtplm","com.ty","com.hustcad.plm", "cn.hutool.extra.spring","org.springframework.boot.context.properties"},exclude = {MongoAutoConfiguration.class})
@ServletComponentScan
@MapperScan(basePackages = { "cqrtplm.mapper","com.ty.*.*.mapper", "com.hustcad.plm.*.mapper", "com.hustcad.plm.*.*.mapper", "com.ty.pdm.*.*.mapper"}
        , properties = {"safeDelete=true", "safeUpdate=true"})
@EnableAsync
@EnableScheduling
@EnableEncryptableProperties
@EnableAspectJAutoProxy(exposeProxy = true, proxyTargetClass = true)
@EnableFeignClients(basePackages = {"com.hustcad.plm.pdm.common.service.remote", "com.hustcad.plm.lightweight.service.remote", "com.hustcad.plm.middle.caddocapi.remote"})
@EnableDiscoveryClient
@PropertySources({@PropertySource("classpath:/config/application.properties")})
@EnableConfigurationProperties(ConfigurableAttrCardsConfig.class)
public class StartApplication {
    public static void main(String[] args) {
        SpringApplication.run(StartApplication.class, args);
    }
}
